package top.atcra.rpc.service;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 服务端使用这个类来定义服务
 *
 * @author atcra
 * @date 2025-3-31
 */
@Data
@Accessors(chain = true)
@AllArgsConstructor
public class ServiceConfig {
    private String name;
    private String group = "default";
    //TODO: 为interfaceClass增加跨语言支持。考虑采用Protobuf实现基于数据模型生成接口类
    // 接口的定义类
//    private Class<?> interfaceClass;
    private Object ref;  // 实现类的对象实例

    public ServiceConfig(String name) {
        this.name = name;
    }

    public ServiceConfig(String name, String group) {
        this.name = name;
        this.group = group;
    }
}
